import { createSSRApp } from 'vue'
import App from './App'
import uviewPlus, { setConfig } from 'uview-plus'
import * as Pinia from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import router  from './router'



//参考：https://blog.csdn.net/m0_70027114/article/details/132957426
export function createApp() {
  const app = createSSRApp(App);
  
	const pinia=Pinia.createPinia()
	pinia.use(piniaPluginPersistedstate)
	app.use(pinia);
	app.use(uviewPlus)
	app.use(router)


  return {
    app,
	Pinia,// 此处必须将 Pinia 返回
  };
}
